package com.smart.campus.school.service.impl;

import java.util.List;

import com.smart.campus.school.domain.vo.PsychologicalTestRecordVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smart.campus.school.mapper.PsychologicalTestRecordMapper;
import com.smart.campus.school.domain.PsychologicalTestRecord;
import com.smart.campus.school.service.IPsychologicalTestRecordService;
import com.smart.campus.common.core.text.Convert;

/**
 * 心理测试记录Service业务层处理
 * 
 * @author Zhihe.Li
 * @date 2020-05-27
 */
@Service
public class PsychologicalTestRecordServiceImpl implements IPsychologicalTestRecordService 
{
    @Autowired
    private PsychologicalTestRecordMapper psychologicalTestRecordMapper;

    /**
     * 查询心理测试记录
     * 
     * @param id 心理测试记录ID
     * @return 心理测试记录
     */
    @Override
    public PsychologicalTestRecord selectPsychologicalTestRecordById(Long id)
    {
        return psychologicalTestRecordMapper.selectPsychologicalTestRecordById(id);
    }

    /**
     * 查询心理测试记录列表
     * 
     * @param psychologicalTestRecord 心理测试记录
     * @return 心理测试记录
     */
    @Override
    public List<PsychologicalTestRecordVo> selectPsychologicalTestRecordList(PsychologicalTestRecordVo psychologicalTestRecord)
    {
        return psychologicalTestRecordMapper.selectPsychologicalTestRecordList(psychologicalTestRecord);
    }

    /**
     * 新增心理测试记录
     * 
     * @param psychologicalTestRecord 心理测试记录
     * @return 结果
     */
    @Override
    public int insertPsychologicalTestRecord(PsychologicalTestRecord psychologicalTestRecord)
    {
        return psychologicalTestRecordMapper.insertPsychologicalTestRecord(psychologicalTestRecord);
    }

    /**
     * 修改心理测试记录
     * 
     * @param psychologicalTestRecord 心理测试记录
     * @return 结果
     */
    @Override
    public int updatePsychologicalTestRecord(PsychologicalTestRecord psychologicalTestRecord)
    {
        return psychologicalTestRecordMapper.updatePsychologicalTestRecord(psychologicalTestRecord);
    }

    /**
     * 删除心理测试记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePsychologicalTestRecordByIds(String ids)
    {
        return psychologicalTestRecordMapper.deletePsychologicalTestRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除心理测试记录信息
     * 
     * @param id 心理测试记录ID
     * @return 结果
     */
    @Override
    public int deletePsychologicalTestRecordById(Long id)
    {
        return psychologicalTestRecordMapper.deletePsychologicalTestRecordById(id);
    }
}
